summaryrefslogtreecommitdiffstats
path: root/src/hid_core/resources/keyboard/keyboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/hid_core/resources/keyboard/keyboard.h')
-rw-r--r--src/hid_core/resources/keyboard/keyboard.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/hid_core/resources/keyboard/keyboard.h b/src/hid_core/resources/keyboard/keyboard.h
new file mode 100644
index 000000000..4bcc1c1b2
--- /dev/null
+++ b/src/hid_core/resources/keyboard/keyboard.h
@@ -0,0 +1,33 @@
+// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "hid_core/resources/controller_base.h"
+#include "hid_core/resources/keyboard/keyboard_types.h"
+
+namespace Core::HID {
+class HIDCore;
+class EmulatedDevices;
+} // namespace Core::HID
+
+namespace Service::HID {
+class Keyboard final : public ControllerBase {
+public:
+ explicit Keyboard(Core::HID::HIDCore& hid_core_);
+ ~Keyboard() override;
+
+ // Called when the controller is initialized
+ void OnInit() override;
+
+ // When the controller is released
+ void OnRelease() override;
+
+ // When the controller is requesting an update for the shared memory
+ void OnUpdate(const Core::Timing::CoreTiming& core_timing) override;
+
+private:
+ KeyboardState next_state{};
+ Core::HID::EmulatedDevices* emulated_devices = nullptr;
+};
+} // namespace Service::HID